<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"  %>
<!DOCTYPE html>
<html>
<head>
    <title>Title</title>
    	<link type="text/css" rel="stylesheet" href="css/style.css">
    	    <link type="text/css" rel="stylesheet" href="css/bootstrap.css">
    	
</head>
<body>
<!--header-->
<jsp:include page="/header.jsp">
    <jsp:param name="flag" value="1"></jsp:param>
</jsp:include>

<br /><br />
<form style="text-align: center;" action="SelectUserById">
请输入您要查询得用户ID<input name="id" type="text"/>
<input type="submit" value="查询"/>
</form>
<br /><br />
	<table  class="table table-bordered table-hover" text-align="center">
    <tr>
        <td width="12.5%">用户ID</td>
        <td width="12.5%">用户账号</td>
        <td width="12.5%">用户密码</td>
        <td width="12.5%">用户年龄</td>
        <td width="12.5%">用户邮箱</td>
        <td width="12.5%">用户权限</td>
        <td width="12.5%">用户注册时间</td>
        <td width="12.5%">操作</td>
 
        <c:forEach items="${list}" var="t">
    <tr>
        <td>${t.id}</td>
        <td>${t.username}</td>
        <td>${t.password}</td>
        <td>${t.sex}</td>
        <td>${t.email}</td>
         <td>${t.introduce}</td>
          <td>${t.registTime}</td>
           <td><a class="btn btn-danger" href="DeleteUserServlet?id=${t.id }">删除</a></td>
    </tr>
    </c:forEach>
    <tr>
        <td><a  class="btn btn-primary" href="UserServlet?pageCode=1">首页</a></td>
        <c:if test="${pageCode==1}" var="flag"></c:if>
       
        <c:if test="${!flag}">
            <td><a href="UserServlet?pageCode=${pageCode-1}">上一页</a></td>
        </c:if>
        <td>当前是第${pageCode}页</td>
        <td>共${totalCode}页</td>
        <td><a class="btn btn-primary" href="UserServlet?pageCode=${pageCode+1}">下一页</a></td>
        <td><a class="btn btn-primary" href="UserServlet?pageCode=${totalCode}">尾页</a></td>
        <td><a class="btn btn-success btn-lg" href="IndexServlet">返回首页</a></td>
    </tr>
   
</table>
</body>
</html>
